package com.ccsoft.leetcode.service;

import org.springframework.stereotype.Service;

/**
 * 9. 回文数
 */
@Service
public class Palindrome {
    public boolean go(int x) {
        String a1 = String.valueOf(x);
        for(int i=0;i<a1.length();i++){
            if( a1.charAt(i) != a1.charAt(a1.length()-i-1))
                return false;
        }

        return true;
    }
}
